package com.csust.automaticteach.app.rag.transformer;

import org.springframework.ai.document.Document;
import org.springframework.ai.model.transformer.KeywordMetadataEnricher;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class MyKeywordEnricher {

    private final KeywordMetadataEnricher enricher;

    public MyKeywordEnricher(KeywordMetadataEnricher enricher) {
        this.enricher = enricher;
    }
    public List<Document> enrichDocuments(List<Document> documents) {
        return enricher.apply(documents);
    }
}